#  Copyright (c) 2023. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
#  Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
#  Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
#  Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
#  Vestibulum commodo. Ut rhoncus gravida arcu.

# coding:utf8
from .base_page import BasePage
from ..pack.base_cls import get_class_attrs_without_
from log import logger

def search_element_from_class(cls_localtor: type, page: BasePage):
    attrs = get_class_attrs_without_(cls_localtor)
    __dict = cls_localtor.__dict__
    num = len(attrs)
    logger.info("start search element, class is {}, "
                "element num is {}".format(cls_localtor.__name__, num))
    for attr in attrs:
        loc = __dict.get(attr)
        logger.debug("-- {:10s} -> {}".format( attr, loc[1] ))
        try:
            page.is_exists_element(loc)
        except:
            logger.debug("! 没有找到")
            pass
        
        
    
     
    
    
    
    
    
    
